
#ifndef _TTG_PIPELINE_UTILITYPROPS_
#define _TTG_PIPELINE_UTILITYPROPS_

#include "Common/Structures.h"

namespace ttg
{
	namespace utils
	{
		//Defines properties for utility.
		struct UtilityProps :public structures::NamedObject,
							 public structures::SerializableObject
		{
			public:
				enum Position
				{
					TopLeft,
					TopRight,
					BottomLeft,
					BottomRight,
					Center
				};
				enum ErrorHandler
				{
					ShowMessage,
					ThrowError,
					DoNothing
				};
				//Default constructor for serializer.
				UtilityProps()
					:NamedObject("Not set")
				{
					position = Center;
					isHidden = false;
					onError = ShowMessage;
				}
				//Creates default properties for utility with given name.
				UtilityProps(const char *name)
					:structures::NamedObject(name)
				{
					position = Center;
					isHidden = false;
					onError = ShowMessage;
				}
				//SerializableObject member.
				virtual void serialize(extras::serialization::Serializer &serializer);
				//SerializableObject member.
				virtual void deserialize(extras::serialization::DeSerializer &deserializer);
			public:
				//Defines position on the screen.
				Position position;
				//Should utility be hidden or not?
				bool isHidden;
				//What should be done on loading errors?
				ErrorHandler onError;
		};
	}
}

#endif
